<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Qwt User&#39;s Guide: qwt_polar_marker.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Qwt User&#39;s Guide
   &#160;<span id="projectnumber">6.2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('qwt__polar__marker_8cpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">qwt_polar_marker.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * QwtPolar Widget Library</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Copyright (C) 2008   Uwe Rathmann</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * This library is free software; you can redistribute it and/or</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * modify it under the terms of the Qwt License, Version 1.0</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *****************************************************************************/</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; </div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;qwt_polar_marker.h&quot;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;qwt_polar.h&quot;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;qwt_scale_map.h&quot;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &quot;qwt_symbol.h&quot;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;qwt_text.h&quot;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;qpainter.h&gt;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> LabelDist = 2;</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="keyword">class </span>QwtPolarMarker::PrivateData</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;{</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;  <span class="keyword">public</span>:</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    PrivateData()</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;        : align( Qt::AlignCenter )</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    {</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;        <a class="code" href="class_qwt_polar_marker.html#af4f2a2fb448cde6b8a6a990959f562ea">symbol</a> = <span class="keyword">new</span> <a class="code" href="class_qwt_symbol.html">QwtSymbol</a>();</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    }</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    ~PrivateData()</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    {</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        <span class="keyword">delete</span> <a class="code" href="class_qwt_polar_marker.html#af4f2a2fb448cde6b8a6a990959f562ea">symbol</a>;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    }</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <a class="code" href="class_qwt_text.html">QwtText</a> <a class="code" href="class_qwt_polar_marker.html#af918a87440179a3a3392d8a4c8a25666">label</a>;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    Qt::Alignment align;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    QPen pen;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keyword">const</span> <a class="code" href="class_qwt_symbol.html">QwtSymbol</a>* <a class="code" href="class_qwt_polar_marker.html#af4f2a2fb448cde6b8a6a990959f562ea">symbol</a>;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <a class="code" href="class_qwt_point_polar.html">QwtPointPolar</a> pos;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;};</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; </div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="class_qwt_polar_marker.html#a88c2659eeab01c40bb8b4f4b4b4f01cd">   42</a></span>&#160;<a class="code" href="class_qwt_polar_marker.html#a88c2659eeab01c40bb8b4f4b4b4f01cd">QwtPolarMarker::QwtPolarMarker</a>()</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    : <a class="code" href="class_qwt_polar_item.html">QwtPolarItem</a>( <a class="code" href="class_qwt_text.html">QwtText</a>( <span class="stringliteral">&quot;Marker&quot;</span> ) )</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;{</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    m_data = <span class="keyword">new</span> PrivateData;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <a class="code" href="class_qwt_polar_item.html#aa5222a54ed4578061f6af398a289ab0e">setItemAttribute</a>( <a class="code" href="class_qwt_polar_item.html#a3dfa4f39bc1ac99b0371b4938abe6ad6a7f9ee77f4ec3170c4c7255bf4bd4399c">QwtPolarItem::AutoScale</a> );</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <a class="code" href="class_qwt_polar_item.html#acef8efd945a194b70a11ad39060de917">setZ</a>( 30.0 );</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;}</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="class_qwt_polar_marker.html#a059123939c2d477e8e09fa7badb56679">   52</a></span>&#160;<a class="code" href="class_qwt_polar_marker.html#a059123939c2d477e8e09fa7badb56679">QwtPolarMarker::~QwtPolarMarker</a>()</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;{</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keyword">delete</span> m_data;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;}</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="class_qwt_polar_marker.html#a05d414061d74f4f5df97fe7ce2bf327e">   58</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="class_qwt_polar_marker.html#a05d414061d74f4f5df97fe7ce2bf327e">QwtPolarMarker::rtti</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_qwt_polar_item.html#a6c03d774c1d089ec8603dd37879a9f4dab10c6fd2f1f1e9fa05eeb00100fe45c6">QwtPolarItem::Rtti_PolarMarker</a>;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;}</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="class_qwt_polar_marker.html#a4f32d9e0083ea7a39dc8988de23382c0">   64</a></span>&#160;<a class="code" href="class_qwt_point_polar.html">QwtPointPolar</a> <a class="code" href="class_qwt_polar_marker.html#a4f32d9e0083ea7a39dc8988de23382c0">QwtPolarMarker::position</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keywordflow">return</span> m_data-&gt;pos;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;}</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160; </div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="class_qwt_polar_marker.html#a6f419a2c80865b12f57200f59f1eeb64">   70</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_polar_marker.html#a6f419a2c80865b12f57200f59f1eeb64">QwtPolarMarker::setPosition</a>( <span class="keyword">const</span> <a class="code" href="class_qwt_point_polar.html">QwtPointPolar</a>&amp; pos )</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;{</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordflow">if</span> ( m_data-&gt;pos != pos )</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    {</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        m_data-&gt;pos = pos;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <a class="code" href="class_qwt_polar_item.html#a0fa7263683e0982892162174328a55c1">itemChanged</a>();</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    }</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;}</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="class_qwt_polar_marker.html#a9a08c60cd59f31684edc537e3071e04b">   89</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_polar_marker.html#a9a08c60cd59f31684edc537e3071e04b">QwtPolarMarker::draw</a>( QPainter* painter,</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keyword">const</span> <a class="code" href="class_qwt_scale_map.html">QwtScaleMap</a>&amp; azimuthMap, <span class="keyword">const</span> <a class="code" href="class_qwt_scale_map.html">QwtScaleMap</a>&amp; radialMap,</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keyword">const</span> QPointF&amp; pole, <span class="keywordtype">double</span> radius,</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <span class="keyword">const</span> QRectF&amp; canvasRect )<span class="keyword"> const</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    Q_UNUSED( radius );</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    Q_UNUSED( canvasRect );</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160; </div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">double</span> r = radialMap.<a class="code" href="class_qwt_scale_map.html#a504f1627e0e02ddac03d2ce46507b865">transform</a>( m_data-&gt;pos.radius() );</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">double</span> a = azimuthMap.<a class="code" href="class_qwt_scale_map.html#a504f1627e0e02ddac03d2ce46507b865">transform</a>( m_data-&gt;pos.azimuth() );</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160; </div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keyword">const</span> QPointF pos = qwtPolar2Pos( pole, r, a );</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160; </div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="comment">// draw symbol</span></div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    QSize sSym( 0, 0 );</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="keywordflow">if</span> ( m_data-&gt;symbol-&gt;style() != <a class="code" href="class_qwt_symbol.html#a62f457952470c2076962e83ef2c24d2fac3089b3993834683204a7bda52e763d3">QwtSymbol::NoSymbol</a> )</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    {</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        sSym = m_data-&gt;symbol-&gt;size();</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        m_data-&gt;symbol-&gt;drawSymbol( painter, pos );</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    }</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160; </div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <span class="comment">// draw label</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="keywordflow">if</span> ( !m_data-&gt;label.isEmpty() )</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    {</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        <span class="keywordtype">int</span> xlw = qMax( <span class="keywordtype">int</span>( m_data-&gt;pen.width() ), 1 );</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="keywordtype">int</span> ylw = xlw;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        <span class="keywordtype">int</span> xlw1 = qMax( ( xlw + 1 ) / 2, ( sSym.width() + 1 ) / 2 ) + LabelDist;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        xlw = qMax( xlw / 2, ( sSym.width() + 1 ) / 2 ) + LabelDist;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <span class="keywordtype">int</span> ylw1 = qMax( ( ylw + 1 ) / 2, ( sSym.height() + 1 ) / 2 ) + LabelDist;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        ylw = qMax( ylw / 2, ( sSym.height() + 1 ) / 2 ) + LabelDist;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160; </div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        QRect tr( QPoint( 0, 0 ), m_data-&gt;label.textSize( painter-&gt;font() ).toSize() );</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        tr.moveCenter( QPoint( 0, 0 ) );</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160; </div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        <span class="keywordtype">int</span> dx = pos.x();</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        <span class="keywordtype">int</span> dy = pos.y();</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        <span class="keywordflow">if</span> ( m_data-&gt;align &amp; Qt::AlignTop )</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;            dy += tr.y() - ylw1;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( m_data-&gt;align &amp; Qt::AlignBottom )</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;            dy -= tr.y() - ylw1;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        <span class="keywordflow">if</span> ( m_data-&gt;align &amp; Qt::AlignLeft )</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;            dx += tr.x() - xlw1;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( m_data-&gt;align &amp; Qt::AlignRight )</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;            dx -= tr.x() - xlw1;</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160; </div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        tr.translate( dx, dy );</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        m_data-&gt;label.draw( painter, tr );</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    }</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;}</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160; </div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="class_qwt_polar_marker.html#a0a416aa96c69f57d24a5f4d2021dc501">  148</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_polar_marker.html#a0a416aa96c69f57d24a5f4d2021dc501">QwtPolarMarker::setSymbol</a>( <span class="keyword">const</span> <a class="code" href="class_qwt_symbol.html">QwtSymbol</a>* symbol )</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;{</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <span class="keywordflow">if</span> ( m_data-&gt;symbol != <a class="code" href="class_qwt_polar_marker.html#af4f2a2fb448cde6b8a6a990959f562ea">symbol</a> )</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    {</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        <span class="keyword">delete</span> m_data-&gt;symbol;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        m_data-&gt;symbol = <a class="code" href="class_qwt_polar_marker.html#af4f2a2fb448cde6b8a6a990959f562ea">symbol</a>;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <a class="code" href="class_qwt_polar_item.html#a0fa7263683e0982892162174328a55c1">itemChanged</a>();</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    }</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;}</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160; </div>
<div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="class_qwt_polar_marker.html#af4f2a2fb448cde6b8a6a990959f562ea">  162</a></span>&#160;<span class="keyword">const</span> <a class="code" href="class_qwt_symbol.html">QwtSymbol</a>* <a class="code" href="class_qwt_polar_marker.html#af4f2a2fb448cde6b8a6a990959f562ea">QwtPolarMarker::symbol</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <span class="keywordflow">return</span> m_data-&gt;symbol;</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;}</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160; </div>
<div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="class_qwt_polar_marker.html#a215881a4b8883ecc2e2f7fa2ba6d822d">  172</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_polar_marker.html#a215881a4b8883ecc2e2f7fa2ba6d822d">QwtPolarMarker::setLabel</a>( <span class="keyword">const</span> <a class="code" href="class_qwt_text.html">QwtText</a>&amp; label )</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;{</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <span class="keywordflow">if</span> ( <a class="code" href="class_qwt_polar_marker.html#af918a87440179a3a3392d8a4c8a25666">label</a> != m_data-&gt;label )</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    {</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        m_data-&gt;label = <a class="code" href="class_qwt_polar_marker.html#af918a87440179a3a3392d8a4c8a25666">label</a>;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        <a class="code" href="class_qwt_polar_item.html#a0fa7263683e0982892162174328a55c1">itemChanged</a>();</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    }</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;}</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160; </div>
<div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="class_qwt_polar_marker.html#af918a87440179a3a3392d8a4c8a25666">  185</a></span>&#160;<a class="code" href="class_qwt_text.html">QwtText</a> <a class="code" href="class_qwt_polar_marker.html#af918a87440179a3a3392d8a4c8a25666">QwtPolarMarker::label</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    <span class="keywordflow">return</span> m_data-&gt;label;</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;}</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160; </div>
<div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="class_qwt_polar_marker.html#a09f72cfe702be202dcb0fbca2c93eb31">  201</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_qwt_polar_marker.html#a09f72cfe702be202dcb0fbca2c93eb31">QwtPolarMarker::setLabelAlignment</a>( Qt::Alignment align )</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;{</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    <span class="keywordflow">if</span> ( align == m_data-&gt;align )</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160; </div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    m_data-&gt;align = align;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <a class="code" href="class_qwt_polar_item.html#a0fa7263683e0982892162174328a55c1">itemChanged</a>();</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;}</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160; </div>
<div class="line"><a name="l00214"></a><span class="lineno"><a class="line" href="class_qwt_polar_marker.html#a5088e38e69ca81e5fe7b0b631471ebf8">  214</a></span>&#160;Qt::Alignment <a class="code" href="class_qwt_polar_marker.html#a5088e38e69ca81e5fe7b0b631471ebf8">QwtPolarMarker::labelAlignment</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    <span class="keywordflow">return</span> m_data-&gt;align;</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;}</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160; </div>
<div class="line"><a name="l00228"></a><span class="lineno"><a class="line" href="class_qwt_polar_marker.html#a2e8e72cdea5256ecfb3d0ef0a352f7ff">  228</a></span>&#160;<a class="code" href="class_qwt_interval.html">QwtInterval</a> <a class="code" href="class_qwt_polar_marker.html#a2e8e72cdea5256ecfb3d0ef0a352f7ff">QwtPolarMarker::boundingInterval</a>( <span class="keywordtype">int</span> scaleId )<span class="keyword"> const</span></div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">double</span> v = ( scaleId == QwtPolar::ScaleRadius )</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;        ? m_data-&gt;pos.radius() : m_data-&gt;pos.azimuth();</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160; </div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_qwt_interval.html">QwtInterval</a>( v, v );</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;}</div>
<div class="ttc" id="aclass_qwt_interval_html"><div class="ttname"><a href="class_qwt_interval.html">QwtInterval</a></div><div class="ttdoc">A class representing an interval.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__interval_8h_source.html#l00022">qwt_interval.h:23</a></div></div>
<div class="ttc" id="aclass_qwt_point_polar_html"><div class="ttname"><a href="class_qwt_point_polar.html">QwtPointPolar</a></div><div class="ttdoc">A point in polar coordinates.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__point__polar_8h_source.html#l00028">qwt_point_polar.h:29</a></div></div>
<div class="ttc" id="aclass_qwt_polar_item_html"><div class="ttname"><a href="class_qwt_polar_item.html">QwtPolarItem</a></div><div class="ttdoc">Base class for items on a polar plot.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__item_8h_source.html#l00037">qwt_polar_item.h:38</a></div></div>
<div class="ttc" id="aclass_qwt_polar_item_html_a0fa7263683e0982892162174328a55c1"><div class="ttname"><a href="class_qwt_polar_item.html#a0fa7263683e0982892162174328a55c1">QwtPolarItem::itemChanged</a></div><div class="ttdeci">virtual void itemChanged()</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__item_8cpp_source.html#l00355">qwt_polar_item.cpp:355</a></div></div>
<div class="ttc" id="aclass_qwt_polar_item_html_a3dfa4f39bc1ac99b0371b4938abe6ad6a7f9ee77f4ec3170c4c7255bf4bd4399c"><div class="ttname"><a href="class_qwt_polar_item.html#a3dfa4f39bc1ac99b0371b4938abe6ad6a7f9ee77f4ec3170c4c7255bf4bd4399c">QwtPolarItem::AutoScale</a></div><div class="ttdeci">@ AutoScale</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__item_8h_source.html#l00084">qwt_polar_item.h:83</a></div></div>
<div class="ttc" id="aclass_qwt_polar_item_html_a6c03d774c1d089ec8603dd37879a9f4dab10c6fd2f1f1e9fa05eeb00100fe45c6"><div class="ttname"><a href="class_qwt_polar_item.html#a6c03d774c1d089ec8603dd37879a9f4dab10c6fd2f1f1e9fa05eeb00100fe45c6">QwtPolarItem::Rtti_PolarMarker</a></div><div class="ttdeci">@ Rtti_PolarMarker</div><div class="ttdoc">For QwtPolarMarker.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__item_8h_source.html#l00055">qwt_polar_item.h:55</a></div></div>
<div class="ttc" id="aclass_qwt_polar_item_html_aa5222a54ed4578061f6af398a289ab0e"><div class="ttname"><a href="class_qwt_polar_item.html#aa5222a54ed4578061f6af398a289ab0e">QwtPolarItem::setItemAttribute</a></div><div class="ttdeci">void setItemAttribute(ItemAttribute, bool on=true)</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__item_8cpp_source.html#l00201">qwt_polar_item.cpp:201</a></div></div>
<div class="ttc" id="aclass_qwt_polar_item_html_acef8efd945a194b70a11ad39060de917"><div class="ttname"><a href="class_qwt_polar_item.html#acef8efd945a194b70a11ad39060de917">QwtPolarItem::setZ</a></div><div class="ttdeci">void setZ(double z)</div><div class="ttdoc">Set the z value.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__item_8cpp_source.html#l00142">qwt_polar_item.cpp:142</a></div></div>
<div class="ttc" id="aclass_qwt_polar_marker_html_a059123939c2d477e8e09fa7badb56679"><div class="ttname"><a href="class_qwt_polar_marker.html#a059123939c2d477e8e09fa7badb56679">QwtPolarMarker::~QwtPolarMarker</a></div><div class="ttdeci">virtual ~QwtPolarMarker()</div><div class="ttdoc">Destructor.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__marker_8cpp_source.html#l00052">qwt_polar_marker.cpp:52</a></div></div>
<div class="ttc" id="aclass_qwt_polar_marker_html_a05d414061d74f4f5df97fe7ce2bf327e"><div class="ttname"><a href="class_qwt_polar_marker.html#a05d414061d74f4f5df97fe7ce2bf327e">QwtPolarMarker::rtti</a></div><div class="ttdeci">virtual int rtti() const override</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__marker_8cpp_source.html#l00058">qwt_polar_marker.cpp:58</a></div></div>
<div class="ttc" id="aclass_qwt_polar_marker_html_a09f72cfe702be202dcb0fbca2c93eb31"><div class="ttname"><a href="class_qwt_polar_marker.html#a09f72cfe702be202dcb0fbca2c93eb31">QwtPolarMarker::setLabelAlignment</a></div><div class="ttdeci">void setLabelAlignment(Qt::Alignment)</div><div class="ttdoc">Set the alignment of the label.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__marker_8cpp_source.html#l00201">qwt_polar_marker.cpp:201</a></div></div>
<div class="ttc" id="aclass_qwt_polar_marker_html_a0a416aa96c69f57d24a5f4d2021dc501"><div class="ttname"><a href="class_qwt_polar_marker.html#a0a416aa96c69f57d24a5f4d2021dc501">QwtPolarMarker::setSymbol</a></div><div class="ttdeci">void setSymbol(const QwtSymbol *s)</div><div class="ttdoc">Assign a symbol.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__marker_8cpp_source.html#l00148">qwt_polar_marker.cpp:148</a></div></div>
<div class="ttc" id="aclass_qwt_polar_marker_html_a215881a4b8883ecc2e2f7fa2ba6d822d"><div class="ttname"><a href="class_qwt_polar_marker.html#a215881a4b8883ecc2e2f7fa2ba6d822d">QwtPolarMarker::setLabel</a></div><div class="ttdeci">void setLabel(const QwtText &amp;)</div><div class="ttdoc">Set the label.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__marker_8cpp_source.html#l00172">qwt_polar_marker.cpp:172</a></div></div>
<div class="ttc" id="aclass_qwt_polar_marker_html_a2e8e72cdea5256ecfb3d0ef0a352f7ff"><div class="ttname"><a href="class_qwt_polar_marker.html#a2e8e72cdea5256ecfb3d0ef0a352f7ff">QwtPolarMarker::boundingInterval</a></div><div class="ttdeci">virtual QwtInterval boundingInterval(int scaleId) const override</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__marker_8cpp_source.html#l00228">qwt_polar_marker.cpp:228</a></div></div>
<div class="ttc" id="aclass_qwt_polar_marker_html_a4f32d9e0083ea7a39dc8988de23382c0"><div class="ttname"><a href="class_qwt_polar_marker.html#a4f32d9e0083ea7a39dc8988de23382c0">QwtPolarMarker::position</a></div><div class="ttdeci">QwtPointPolar position() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__marker_8cpp_source.html#l00064">qwt_polar_marker.cpp:64</a></div></div>
<div class="ttc" id="aclass_qwt_polar_marker_html_a5088e38e69ca81e5fe7b0b631471ebf8"><div class="ttname"><a href="class_qwt_polar_marker.html#a5088e38e69ca81e5fe7b0b631471ebf8">QwtPolarMarker::labelAlignment</a></div><div class="ttdeci">Qt::Alignment labelAlignment() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__marker_8cpp_source.html#l00214">qwt_polar_marker.cpp:214</a></div></div>
<div class="ttc" id="aclass_qwt_polar_marker_html_a6f419a2c80865b12f57200f59f1eeb64"><div class="ttname"><a href="class_qwt_polar_marker.html#a6f419a2c80865b12f57200f59f1eeb64">QwtPolarMarker::setPosition</a></div><div class="ttdeci">void setPosition(const QwtPointPolar &amp;)</div><div class="ttdoc">Change the position of the marker.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__marker_8cpp_source.html#l00070">qwt_polar_marker.cpp:70</a></div></div>
<div class="ttc" id="aclass_qwt_polar_marker_html_a88c2659eeab01c40bb8b4f4b4b4f01cd"><div class="ttname"><a href="class_qwt_polar_marker.html#a88c2659eeab01c40bb8b4f4b4b4f01cd">QwtPolarMarker::QwtPolarMarker</a></div><div class="ttdeci">QwtPolarMarker()</div><div class="ttdoc">Sets alignment to Qt::AlignCenter, and style to NoLine.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__marker_8cpp_source.html#l00042">qwt_polar_marker.cpp:42</a></div></div>
<div class="ttc" id="aclass_qwt_polar_marker_html_a9a08c60cd59f31684edc537e3071e04b"><div class="ttname"><a href="class_qwt_polar_marker.html#a9a08c60cd59f31684edc537e3071e04b">QwtPolarMarker::draw</a></div><div class="ttdeci">virtual void draw(QPainter *painter, const QwtScaleMap &amp;azimuthMap, const QwtScaleMap &amp;radialMap, const QPointF &amp;pole, double radius, const QRectF &amp;canvasRect) const override</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__marker_8cpp_source.html#l00089">qwt_polar_marker.cpp:89</a></div></div>
<div class="ttc" id="aclass_qwt_polar_marker_html_af4f2a2fb448cde6b8a6a990959f562ea"><div class="ttname"><a href="class_qwt_polar_marker.html#af4f2a2fb448cde6b8a6a990959f562ea">QwtPolarMarker::symbol</a></div><div class="ttdeci">const QwtSymbol * symbol() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__marker_8cpp_source.html#l00162">qwt_polar_marker.cpp:162</a></div></div>
<div class="ttc" id="aclass_qwt_polar_marker_html_af918a87440179a3a3392d8a4c8a25666"><div class="ttname"><a href="class_qwt_polar_marker.html#af918a87440179a3a3392d8a4c8a25666">QwtPolarMarker::label</a></div><div class="ttdeci">QwtText label() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__polar__marker_8cpp_source.html#l00185">qwt_polar_marker.cpp:185</a></div></div>
<div class="ttc" id="aclass_qwt_scale_map_html"><div class="ttname"><a href="class_qwt_scale_map.html">QwtScaleMap</a></div><div class="ttdoc">A scale map.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__scale__map_8h_source.html#l00026">qwt_scale_map.h:27</a></div></div>
<div class="ttc" id="aclass_qwt_scale_map_html_a504f1627e0e02ddac03d2ce46507b865"><div class="ttname"><a href="class_qwt_scale_map.html#a504f1627e0e02ddac03d2ce46507b865">QwtScaleMap::transform</a></div><div class="ttdeci">double transform(double s) const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__scale__map_8h_source.html#l00137">qwt_scale_map.h:137</a></div></div>
<div class="ttc" id="aclass_qwt_symbol_html"><div class="ttname"><a href="class_qwt_symbol.html">QwtSymbol</a></div><div class="ttdoc">A class for drawing symbols.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__symbol_8h_source.html#l00031">qwt_symbol.h:32</a></div></div>
<div class="ttc" id="aclass_qwt_symbol_html_a62f457952470c2076962e83ef2c24d2fac3089b3993834683204a7bda52e763d3"><div class="ttname"><a href="class_qwt_symbol.html#a62f457952470c2076962e83ef2c24d2fac3089b3993834683204a7bda52e763d3">QwtSymbol::NoSymbol</a></div><div class="ttdeci">@ NoSymbol</div><div class="ttdoc">No Style. The symbol cannot be drawn.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__symbol_8h_source.html#l00041">qwt_symbol.h:41</a></div></div>
<div class="ttc" id="aclass_qwt_text_html"><div class="ttname"><a href="class_qwt_text.html">QwtText</a></div><div class="ttdoc">A class representing a text.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__text_8h_source.html#l00051">qwt_text.h:52</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><b>qwt_polar_marker.cpp</b></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
